
package com.example.liang.basamovie.activity;
import android.content.Intent;
import android.os.Handler;;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.widget.ImageView;
import com.example.liang.basamovie.R;

public class WelcomeActivity extends AppCompatActivity {
    ImageView imagewelcome;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);
        initView();
    }

    private void initView() {
        imagewelcome = (ImageView) findViewById(R.id.image_welcom_splash);
        Animation animation = new AlphaAnimation(1f,1f);
        animation.setDuration(3000);
        imagewelcome.startAnimation(animation);
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                Intent intent = new Intent(WelcomeActivity.this,HomeActivity.class);
                startActivity(intent);
                finish();
                //
            }
        },3000);
    }
}

